package com.example.asus.testskip.DGPhone;

import android.app.Activity;
import android.content.Intent;
import android.graphics.Color;
import android.graphics.Typeface;
import android.os.Bundle;
import android.os.Handler;
import android.os.Message;
import android.widget.TextClock;
import android.widget.TextView;

import com.example.asus.testskip.R;

import java.util.Timer;
import java.util.TimerTask;


/* renamed from: dg.ca.com.DGPhone.ShowActivity */
public class ShowActivity extends Activity {
    /* access modifiers changed from: private */
    public Handler handler;
    private TextView showPhone;
    private int step = 0;
    private TextClock textClock;
    CustomTextView textView;
    CustomTextView textView1;

    /* access modifiers changed from: protected */
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        requestWindowFeature(1);
        getWindow().setFlags(1024, 1024);
        getWindow().addFlags(128);
        this.handler = new Handler() {
            public void handleMessage(Message msg) {
                super.handleMessage(msg);
            }
        };
        Intent intent = getIntent();
        String welcome = intent.getStringExtra("welcome");
        String welcomeen = intent.getStringExtra("welcomeen");
        String phone = intent.getStringExtra("phone");
        setContentView(R.layout.activity_show);
        this.showPhone = (TextView) findViewById(R.id.showPhone);
        this.showPhone.setTypeface(Typeface.createFromAsset(getAssets(), "yihei.ttf"));
        this.showPhone.setText(phone);
        this.textClock = (TextClock) findViewById(R.id.textClock);
        this.textClock.setTypeface(Typeface.createFromAsset(getAssets(), "yihei.ttf"));
        int color = Color.BLUE;
        this.textView = (CustomTextView) findViewById(R.id.textview);
        this.textView.setText(welcome);
        this.textView.init(getWindowManager());
        this.textView.startScroll();
        this.textView.setEnabled(false);
        this.textView1 = (CustomTextView) findViewById(R.id.textview1);
        this.textView1.setText(welcomeen);
        this.textView1.init(getWindowManager());
        this.textView1.setEnabled(false);
        setCallBack1();
        setCallBack2();
        int color2 = Color.GREEN;
        new Timer();
        new TimerTask() {
            public void run() {
                ShowActivity.this.handler.sendEmptyMessage(0);
            }
        };
    }

    private void setCallBack1() {
        this.textView.setCallBack(new CustomTextView.CallBack() {
            public void drawHalf() {
                ShowActivity.this.textView1.startScroll();
            }

            public void drawFinish() {
                ShowActivity.this.textView.stopScroll();
            }
        });
    }

    private void setCallBack2() {
        this.textView1.setCallBack(new CustomTextView.CallBack() {
            public void drawHalf() {
                ShowActivity.this.textView.startScroll();
            }

            public void drawFinish() {
                ShowActivity.this.textView1.stopScroll();
            }
        });
    }
}
